package router

import (
	"github.com/gin-gonic/gin"
	"go-demo/common/global"
	"go-demo/mvc/controller"
	"go-demo/mvc/service"
)

func UserRouter(router *gin.Engine) {
	userService := service.NewUserService(global.App.Mysql)
	userController := controller.NewUserController(userService)

	userGroup := router.Group("/user")
	{
		userGroup.POST("/login", userController.Login)
		userGroup.POST("/register", userController.Register)
	}
}
